package com.weihe.toolkit.ftp4j;

import it.sauronsoftware.ftp4j.FTPDataTransferListener;

public class FtpListener implements FTPDataTransferListener { 
        private FTPOptType optType; 

        public static FtpListener instance(FTPOptType optType) { 
                return new FtpListener(optType); 
        } 

        private FtpListener(FTPOptType optType) { 
                this.optType = optType; 
        } 

        public void started() { 
                System.out.println(optType.getOptname() + " start"); 
        } 

        public void transferred(int length) { 
                System.out.println(optType.getOptname() + " transferred"); 

        } 

        public void completed() { 
                System.out.println(optType.getOptname() + " completed"); 
        } 

        public void aborted() { 
                System.out.println(optType.getOptname() + " aborted"); 
        } 

        public void failed() { 
                System.out.println(optType.getOptname() + " failed"); 
        } 
}